<template>
  <div class="tdtContainer">
    <div class="bcColor"></div>
    <h3 class="title">切 换 天 地 图 图 层</h3>
    <div class="inner">
      <div class="column">
        <img src="../../assets/images/天地图矢量.png" alt="Image 1" class="img1" @click="addVec" />
      </div>
      <div class="column">
        <img src="../../assets/images/天地图影像.png" alt="Image 1" class="img1" @click="addImg" />
      </div>
      <div class="column">
        <img src="../../assets/images/天地图地形.png" alt="Image 1" class="img1" @click="addTer" />
      </div>
    </div>
  </div>
</template>

<script>
import { ref } from 'vue'
import bus from '@/utils/bus.js'

export default {
  setup() {
    const value1 = ref(true)
  },
  name: 'TiandituChange',
  data() {
    return {}
  },
  methods: {
    addVec() {
      bus.$emit('addTiandituVec')
    },
    addImg() {
      bus.$emit('addTiandituImg')
    },
    addTer() {
      bus.$emit('addTiandituTer')
    }
  }
}
</script>

<style lang="less" scoped>
.tdtContainer {
  display: flex;
  width: 280px;
  height: 80px;
  border: 10px solid pink;
  border-width: 51px 38px 20px 132px;
  border-image-source: url(../../assets/images/border.png);
  border-image-slice: 51 38 20 132;
  .title {
    position: absolute;
    z-index: 999;
    font-weight: bold;
    // display: block;
    top: -8px;
    left: 25px;
    height: 18px;
    line-height: 1;
    padding: 0 18px;
    color: red;
    font-size: 18px;
    border-right: 0.025rem solid #00f2f1;
    user-select: none;
  }
}

.bcColor {
  position: absolute;
  top: 7px;
  left: 12px;
  width: 423px;
  height: 128px;
}

.inner {
  position: absolute;
  display: flex;
  top: 40px;
  left: 50px;
  width: 270px;
  height: 20px;
  .column {
    flex-grow: 1;
    margin-right: 30px;
  }
}

.img1 {
  width: 90px;
  height: 90px;
  border-radius: 20%;
}

.img1:hover {
  border: 2px solid skyblue;
  box-shadow: 0 0 5px skyblue;
}
</style>
